#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
Insertsort(int* a, int size) {
	for (int i = 0; i < size - 1; i++) {
		int end = i;
		int tmp = a[end + 1];
			while (end >= 0) {
				if (a[end] > tmp) {
					a[end + 1] = a[end];
					end--;
				}
				else {
					break;
				}
			}
		a[end + 1] = tmp;
	}

}
int main() {
	int size;
	scanf("%d", &size);
	int* a = (int*)malloc(sizeof(int)*size);
	for (int i = 0; i < size; i++) {
		scanf("%d",&a[i]);
	}
	Insertsort(a, size);
	for (int i = 0; i < size; i++) {
		printf("%d ", a[i]);
	}
	return 0;
}